import 'package:earclean/app/modules/widget/mang_dialog.dart';
import 'package:earclean/app/modules/widget/pay_dialog.dart';
import 'package:earclean/app/util/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class YueUtils {
  static yuyue(Map info) {
    String full = box.read("full") ?? "";
    if (full.isNotEmpty) {
      showMang(full);
    } else {
      showPay(info);
    }
  }

  static showMang(String title) {
    Get.dialog(MangDialogView(title: title),
        barrierColor: Colors.black.withAlpha(100));
  }

  static showPay(Map info) {
    Get.dialog(PayDialogView(info: info),
            barrierColor: Colors.black.withAlpha(100))
        .then((value) async {
      if (value == 1) {}
    });
  }
}
